﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mindfor.Web.Data
{
	/// <summary>
	/// Class for tag data object.
	/// </summary>
	public class Tag : IdEntity
	{
		string m_name;

		/// <summary>
		/// Gets or sets tag name.
		/// </summary>
		public virtual string Name
		{
			get { return m_name; }
			set
			{
				m_name = value;
				NameLower = value.ToLowerInvariant();
			}
		}

		/// <summary>
		/// Gets lowered tag name.
		/// </summary>
		public virtual string NameLower { get; private set; }

		/// <summary>
		/// Initializes new instance.
		/// </summary>
		public Tag()
		{
		}

		/// <summary>
		/// Initializes new instance.
		/// </summary>
		/// <param name="name">Tag name.</param>
		public Tag(string name)
		{
			Name = name;
		}
	}
}
